<template>
  <div id="app">
    <icon type="weixin"/>
    <icon type="empty"/>
    <Comp 
    :current="current" 
    :total="total" 
    :pageData="pageData" 
    @changePage="ChangeNum"/>
  <loadImage
    :low="low"
    :high="high"
    :durantion="durantion"
    @load="handleCompelete"
  ></loadImage>
  <empty />
  </div>
</template>

<script>
import icon from './components/Icon'
import Comp from './components/Comp'
import loadImage from './components/loadImage'
import empty from './components/Empty'

export default {
  name: 'app',
  components: {
    icon,
    Comp,
    loadImage,
    empty
  },
  data(){
    return{
      current:2,
      total:202,
      pageData:10,
      durantion:2000,
      low:"https://img0.baidu.com/it/u=2281953704,765036610&fm=26&fmt=auto&gp=0.jpg",
      high:"https://img2.baidu.com/it/u=1358273860,1305317236&fm=26&fmt=auto&gp=0.jpg"
    }
  },
  methods:{
    handleCompelete(){
      console.log("图片加载完成")
    },
    ChangeNum(e){
      this.current = e
      if(e<1){
        this.current=1
      }
      if(e>this.current){
        return  
      }
    }
  }
}
</script>

<style>
</style>
